package com.scs.user.controller;

import com.scs.base.response.JsonResult;
import com.scs.user.pojo.dto.UserLoginParam;
import com.scs.user.pojo.vo.UserVO;
import com.scs.user.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/v1/user")
public class UserController {

    @Autowired
    UserService userService;

    @PostMapping("login")
    public JsonResult login(UserLoginParam userLoginParam) {
        log.debug("用户登录: {}",userLoginParam);
        UserVO userVO = userService.login(userLoginParam);
        return JsonResult.ok(userVO);
    }
    //1111111111111111111111111111111111111
}
